﻿using cfg.Myskill;
using UnityEngine;

public class CloneBaseSkill:SkillBase
{
    public CloneBaseSkill(string skillName) : base(skillName)
    {
    }
    
    public virtual CloneController Clone(string prefab,Vector2 pos,int faceDir)
    {
        GameObject cloneObj = PoolMgr.Instance.GetObj(prefab);
        var  cloneController = cloneObj.GetComponent<CloneController>();
        var skillInfo = LoadCofigManager.Instance.GetSkillInfo(skillName).Info;
        cloneController.Init(skillInfo as CloneBase,pos,faceDir);
        return cloneController;
    }
}